import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Personal from '../components/Personal'
import Mall from '../components/Mall'
import MallExchange from '../components/Mall/exchange'
import Setting from '../components/personal/Setting'
import Edit from '../components/personal/Edit'
import Integral from '../components/personal/Integral'
import Login from '../components/personal/Login'
import Registered from '../components/personal/registered'
import HeadPortrait from '../components/personal/Head-portrait'
// import PhoneLogin from '../components/personal/PhoneLogin'
import ListAbout from '../components/personal/ListAbout'
import ListFeedback from '../components/personal/ListFeedback'
import SettingPass from '../components/personal/SettingPass'
import PassForget from '../components/personal/PassForget'
import ReinstallPass from '../components/personal/ReinstallPass'
import OrderAll from '../components/personal/OrderDetails/all'
import HomeRecycled from '@/components/home/recycled'
import FoodWaste from '@/components/home/foodwaste'
import HomeHarmful from '@/components/home/harmful'
import HomeOther from '@/components/home/other'
import TitleError from '@/components/home/error'
import Detail from '@/components/home/detail'
import scan from '@/components/home/scanList'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal',
      name: 'personal',
      component: Personal,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/list-about',
      name: 'list-about',
      component: ListAbout,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/list-feedback',
      name: 'list-feedback',
      component: ListFeedback,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/setting',
      name: 'setting',
      component: Setting,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/setting/edit',
      name: 'edit',
      component: Edit,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/setting/setting-pass',
      name: 'setting-pass',
      component: SettingPass,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/setting/edit/head-portrait',
      name: 'head-portrait',
      component: HeadPortrait,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/integral',
      name: 'integral',
      component: Integral,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/Mall',
      name: 'Mall',
      component: Mall,
      meta: {
        keepAlive: true
      }
    }, {
      path: '/Mall/exchange/:id',
      name: 'MallExchange',
      component: MallExchange,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/login',
      name: 'login',
      component: Login,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/login/pass-forget',
      name: 'pass-forget',
      component: PassForget,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/login/pass-forget/reinstall-pass',
      name: 'reinstall-pass',
      component: ReinstallPass,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/login/registered',
      name: 'registered',
      component: Registered,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/personal/Order/all',
      name: 'OrderAll',
      component: OrderAll,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/home/recycled',
      name: 'HomeRecycled',
      component: HomeRecycled,
      meta: {
        keepAlive: true
      }
    }, {
      path: '/home/foodWaste',
      name: 'FoodWaste',
      component: FoodWaste,
      meta: {
        keepAlive: true
      }
    }, {
      path: '/home/harmful',
      name: 'HomeHarmful',
      component: HomeHarmful,
      meta: {
        keepAlive: true
      }
    }, {
      path: '/home/other',
      name: 'HomeOther',
      component: HomeOther,
      meta: {
        keepAlive: true
      }
    }, {
      path: '/home/error',
      name: 'Error',
      component: TitleError,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/home/detail/:value',
      name: 'Detail',
      component: Detail,
      meta: {
        keepAlive: false
      }
    }, {
      path: '/home/scan/',
      name: 'scan',
      component: scan,
      meta: {
        keepAlive: false
      }
    }
  ]
})
